﻿using System;
using System.Collections.Generic;

namespace TrainTicketsAuto.Ocrlib
{
    public class CharPicPixels
    {
        private char a0;
        private int[,] b0;
        private List<uint> c0;
        private List<uint> d0;
        private int e0;
        private int f0;

        public CharPicPixels(int[,] A_0)
        {
            this.c1(A_0);
        }

        public CharPicPixels(char A_0, int[,] A_1)
            : this(A_1)
        {
            this.a0 = A_0;
        }

        public List<uint> a()
        {
            return this.c0;
        }

        private List<uint> a(int[,] A_0)
        {
            List<uint> list = new List<uint>();
            for (int i = 0; i < A_0.GetLength(0); i++)
            {
                list.Add(0);
                for (int j = 0; j < A_0.GetLength(1); j++)
                {
                    List<uint> list2;
                    int num3;
                    (list2 = list)[num3 = i] = list2[num3] +
                                               (Convert.ToUInt32(A_0[i, j].ToString())*
                                                ((uint) Math.Pow(2.0, (double) ((A_0.GetLength(1) - 1) - j))));
                }
            }
            return list;
        }

        public void a(List<uint> A_0)
        {
            this.c0 = A_0;
        }

        public void a(char A_0)
        {
            this.a0 = A_0;
        }

        public void a(int A_0)
        {
            this.e0 = A_0;
        }

        public char b()
        {
            return this.a0;
        }

        private List<uint> b(int[,] A_0)
        {
            List<uint> list = new List<uint>();
            for (int i = 0; i < A_0.GetLength(1); i++)
            {
                list.Add(0);
                for (int j = 0; j < A_0.GetLength(0); j++)
                {
                    List<uint> list2;
                    int num3;
                    (list2 = list)[num3 = i] = list2[num3] +
                                               (Convert.ToUInt32(A_0[j, i])*
                                                ((uint) Math.Pow(2.0, (double) ((A_0.GetLength(0) - 1) - j))));
                    if (A_0[j, i] == 1)
                    {
                        this.f0++;
                    }
                }
            }
            return list;
        }

        public void b(List<uint> A_0)
        {
            this.d0 = A_0;
        }

        public int c1()
        {
            return this.b0.GetLength(0);
        }

        private void c1(int[,] A_0)
        {
            this.b0 = A_0;
            this.d0 = new List<uint>();
            this.d0 = this.a(A_0);
            this.c0 = new List<uint>();
            this.c0 = this.b(A_0);
        }

        public int d()
        {
            return this.b0.GetLength(1);
        }

        public List<uint> e()
        {
            return this.d0;
        }

        public int f()
        {
            return this.e0;
        }

        public int g()
        {
            return this.f0;
        }
    }
}
